'use strict';

const Service = require('egg').Service;

class GetDetailService extends Service {
<<<<<<< HEAD
  async getHouseDetail(detailId) {
    const detail = await this.app.mysql.query(`SELECT d.*,m.message_name,m.message_url,m.message_phone from house_detail as d LEFT JOIN message_list as m ON d.message_id = m.message_id WHERE d.detail_id = ${detailId}`)
=======
  async getHouseDetail(houseId) {
    const detail = await this.app.mysql.query(`SELECT d.* FROM house_detail as d LEFT JOIN houselist as l ON d.detail_id = l.detail_id WHERE l.house_id = ${houseId}`)
>>>>>>> 732deab553a83bd23ce5ab1d416e1b615a719bfb
    return detail
  }
}

module.exports = GetDetailService;
